package com.hjf.string;

public class Test {
    public static void main(String[] args) {
        String name1 = "HJF";        // 1
        String name2 = new String("HJF");  // 2

        char[] chars = {'H','J','F'};   // 3
        String name3 = new String(chars);

        byte[] bytes = {97,98,99};  // 4 转化ASCII码
        String name4 = new String(bytes);
    }
}
